<controls:ChildWindow  
    x:Class="ibba.src.sl.componentes.CustomDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    Width="440" Height="Auto"
    Title="CustomDialog">
        
    <controls:ChildWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Assets/Styles/CustomDialogStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </controls:ChildWindow.Resources>

    <controls:ChildWindow.Style>
        <StaticResource ResourceKey="CustomDialogStyle"/>
    </controls:ChildWindow.Style>

    <Grid x:Name="LayoutRoot" Margin="0" Background="{x:Null}" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>

            <!--<TextBlock Name="lblDialogTitle" Text="lblDialogTitle" TextWrapping="Wrap" 
                           FontSize="18" Foreground="#FF1561A7" 
                           HorizontalAlignment="Stretch" VerticalAlignment="Top" 
                           Margin="20,5,72,0" FontWeight="Bold" FontFamily="Arial" />-->

            <Border BorderBrush="#FFC5C9CB" BorderThickness="2" CornerRadius="15"
                    HorizontalAlignment="Left" Margin="20,8,20,20"
                    MinWidth="120" MinHeight="100" />

            <Image x:Name="imgDialogIcon" Margin="0,8,10,0"
                   HorizontalAlignment="Right" VerticalAlignment="Top" 
                   Width="64" Height="64" Source="/ibba.src.sl.componentes;component/Assets/Image/information.png" />

            <Grid Margin="68,35,72,40" VerticalAlignment="Center" HorizontalAlignment="Stretch" Background="White">
                <TextBlock Name="lblDialogMessage" FontSize="13" TextWrapping="Wrap" Height="Auto" 
                           Margin="0,10,0,10" Foreground="#FF6E7272" MaxHeight="250"
                           Text="lblDialogMessage"/>
                
            </Grid>

            <ScrollViewer x:Name="svDetail" Grid.Row="1" BorderThickness="0" Margin="20,-10,22,10" MaxHeight="100"
                          VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
                          Visibility="Collapsed" Padding="3,3,8,3">
                <TextBox x:Name="lblDialogMessageDetail" TextWrapping="Wrap" Text="lblDialogMessageDetail" 
                         VerticalAlignment="Stretch" Height="Auto" BorderThickness="0" FontSize="11"
                         IsReadOnly="True" Style="{StaticResource TextReadOnly}" />
            </ScrollViewer>
            
            <StackPanel Grid.Row="2" VerticalAlignment="Bottom">
                <Border VerticalAlignment="Bottom" Padding="8,0,8,0"
                        Background="White" BorderBrush="#FFC9C9C9" BorderThickness="0,0,0,0">
                    <!--Background="#FFECECEC" BorderBrush="#FFC9C9C9" BorderThickness="0,1,0,1">-->

                    <Grid Margin="0,8,0,8">

                        <Border Height="1" Background="#FFC5C9CB" Margin="-5,0,-5,0" />

                        <toolkit:Expander x:Name="expDetalheAdicional" Margin="5,0,0,0" 
                                          HorizontalAlignment="Left" VerticalAlignment="Center" 
                                          Header="Mais detalhes" Background="White" Padding="3,0,3,0" 
                                          Expanded="expDetalheAdicional_Expanded" Collapsed="expDetalheAdicional_Collapsed"
                                          Visibility="Collapsed" />

                        <Border BorderBrush="#FFC5C9CB" BorderThickness="1,0,1,0" Margin="0,0,8,0" 
                                    Background="White" HorizontalAlignment="Right" Padding="6,0,2,0" >
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">

                                <Button x:Name="btnYes" Width="65" Height="23" Content="Sim" Margin="0,0,4,0" VerticalAlignment="Center" Click="btnYes_Click" />
                                <Button x:Name="btnNo" Width="65" Height="23" Content="No" Margin="0,0,4,0" VerticalAlignment="Center" Click="btnNo_Click" />
                                <Button x:Name="btnCancel" Width="65" Height="23" Content="Cancelar" Margin="0,0,4,0" VerticalAlignment="Center" Click="btnCancel_Click" />

                            </StackPanel>
                        </Border>

                    </Grid>
                </Border>

                <Border x:Name="borderFooterText" HorizontalAlignment="Stretch" Width="Auto" 
                        Background="#FFEFEFEF" BorderBrush="#FFC9C9C9" BorderThickness="1,1,1,1"
                        CornerRadius="0,0,12,12" Margin="0,5,0,0">
                    
                    <StackPanel Height="Auto" Orientation="Horizontal" >
                        <Image x:Name="imgFooterIcon" Margin="6,2,2,2" RenderTransformOrigin="0.5,0.5"
                               HorizontalAlignment="Left"  VerticalAlignment="Center" 
                               Width="22" Height="22" Source="/ibba.src.sl.componentes;component/Assets/Image/information.png" >                            
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                                    <SkewTransform AngleX="0" AngleY="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform X="0" Y="-1"/>
                                </TransformGroup>
                            </Image.RenderTransform>
                        </Image>
                            
                                                    
                        <TextBlock x:Name="lblFooterText" HorizontalAlignment="Stretch" VerticalAlignment="Center" 
                                   FontFamily="Trebuchet MS" FontSize="11"
                                   Text="lblFooterText" TextWrapping="Wrap"/>

                    </StackPanel>
                </Border>
            </StackPanel>

        </Grid>
    </Grid>
</controls:ChildWindow>